<h1>Listing articles</h1>

<table>
    <tr>
        <th>Title</th>
        <th>Text</th>
    </tr>

    <% @articles.each do |article| %>
        <tr>
            <td><%= article.title %></td>
            <td><%= article.text %></td>
            <td><%= link_to 'Show', article_path(article) %></td>
            <td><%= link_to 'Edit', edit_article_path(article) %></td>
            <td><%= link_to 'destory', article_path(article), method: :delete, data: {confirm: 'Are you sure?' }%></td>
        </tr>
    <% end %>
</table>

<%= link_to 'New article', new_article_path %>
